<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/jsp/common/head.jsp"%>
<div class="content">
    <div class="container-fluid">
        <nav class="pull-left">
            <strong>你现在所在的位置是:</strong>&nbsp;&nbsp;&nbsp; <span> 商品管理页面 >> 商品信息查看页面</span><br> <br>
        </nav>
    </div>

    <div class="row">
        <div class="col-lg-4 col-md-5">
            <div class="card card-user">
                <div class="image">
                    <img
                            src="${pageContext.request.contextPath }/statics/img/background.jpg"
                            alt="..." />
                </div>
                <div class="content">
                    <div class="author">
                        <c:choose>
                            <c:when test="${product.fileName == null || product.fileName == ''}">
                                <img class="avatar border-white"
                                     src="${pageContext.request.contextPath }/statics/img/faces/face-1.jpg" />
                            </c:when>
                            <c:otherwise>
                                <img class="avatar border-white" src="${product.fileName}" />
                            </c:otherwise>
                        </c:choose>
                        <h4 class="title">
                            ${product.name }<br />
                        </h4>
                    </div>
                    <p class="description text-center">
                        ${product.description}
                    </p>
                </div>
                <hr>
                <div class="text-center">
                    <div class="row">
                        <div class="col-md-3 col-md-offset-1">
                            <h5>
                                ${product.price}<br /> <small>商品价格</small>
                            </h5>
                        </div>
                        <div class="col-md-3">
                            <h5>
                                ${product.stock}<br /> <small>商品库存</small>
                            </h5>
                        </div>
                        <div class="col-md-4">
                            <h5>
                                ${product.categoryLevel3Id}<br /> <small>三级分类ID</small>
                            </h5>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-lg-8 col-md-7">
            <div class="card">
                <div class="header">
                    <h4 class="title">
                        商品信息 <small> Product Information</small>
                    </h4>
                </div>
                <div class="content">
                    <p>
                        <strong>商品名称：</strong><span>${product.name }</span>
                    </p>
                    <p>
                        <strong>商品价格：</strong><span>${product.price }</span>
                    </p>
                    <p>
                        <strong>商品库存：</strong><span>${product.stock }</span>
                    </p>
                    <p>
                        <strong>商品描述：</strong><span>${product.description }</span>
                    </p>
                    <p>
                        <strong>摆放位置：</strong><span>${product.placement }</span>
                    </p>
                    <p>
                        <strong>商品照片：</strong><span>
                            <c:choose>
                                <c:when test="${product.fileName == null || product.fileName == ''}"> 暂无图片 </c:when>
                                <c:otherwise>
                                    <img src="${product.fileName}" width="240px" />
                                </c:otherwise>
                            </c:choose>
                        </span>
                    </p>
                    <div class="providerAddBtn">
                        <button id="back" class="btn btn-success btn-fill btn-wd" onclick="history.back()">返回</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<%@include file="/WEB-INF/jsp/common/foot.jsp"%>
<script type="text/javascript">
    $(".sidebar-wrapper .nav li:eq(1)").addClass("active");
</script>